import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'

// https://vitejs.dev/config/
export default defineConfig({
  plugins: [vue()],
  base: process.env.NODE_ENV === 'development' ? '/' : './',
  server: {
    host:"192.168.137.1",
    port: 9092,
    open: true,
    proxy: { //配置服务器代理
      '/xingqiu': {
        target: 'http://www.shuiyue.info:20000',
        changeOrigin: true,
        rewrite: path => {
          console.log('----------------------- 代理请求的具体地址')
          console.log(path)
          return path.replace('/xingqiu', '')
        }
      }
    }
  }
})
